<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>云爱伊</title>

    {{template "header"}}
    <link rel="stylesheet" href="resource/css/admin.css">
    <link rel="stylesheet" href="resource/css/login.css">

</head>
<body>
<div class="layadmin-user-login-main" style="margin-top: 200px;">
    <div class="layadmin-user-login-box layadmin-user-login-header">
        <h2>云爱伊</h2>
        <p>脱单恋爱神器，用云爱伊准时准确表达心意</p>
        <p>定时短信发送给那个关心的人，让温暖不迟到。</p>
    </div>
    <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
        <div class="layui-form-item">
            <label class="layadmin-user-login-icon layui-icon layui-icon-username"
                   for="LAY-user-login-username"></label>
            <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名"
                   class="layui-input">
        </div>
        <div class="layui-form-item">
            <label class="layadmin-user-login-icon layui-icon layui-icon-password"
                   for="LAY-user-login-password"></label>
            <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码"
                   class="layui-input">
        </div>

        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="LAY-user-login-submit">登 入</button>
        </div>

    </div>
    <blockquote class="layui-elem-quote layui-text " style="font-size: 16px;font-family: 新宋体;width: 150%">
        <span style="color: red"> 1. 首次登陆直接用电话号码作为用户名和密码</span> <br>
        2. 忘记密码或升级账号,加微信升级账号:koling0079 <br>

    </blockquote>

</div>
<div class="layer-footer"
     style="position: fixed; bottom: 0; width:100%;height:50px;margin: 5px auto;text-align: center">
    <span>备案号: 宁ICP备16001575号-1</span>
</div>

{{template "footer"}}
<script>
    layui.use('form', function () {
        var form = layui.form;
        //提交
        form.on('submit(LAY-user-login-submit)', function (obj) {
            //console.log(obj, obj.field)
            ajaxPostNoAsync("/Login", obj.field, function (data) {
                //console.log(data, typeof (data))
                if (data && data == "true") {
                    window.location.href = "/Main"
                } else {
                    failMsg("用户名不是准确的手机号码,或密码错误!")
                }
            })
        });
    });
</script>
</body>
</html>